import java.util.Scanner;
/**
 * Created with IntelliJ IDEA.
 * Description:
 */
public class TestDemo {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        float h=scanner.nextFloat();
        int n =scanner.nextInt();
        float high = h;
        float h1 =h;
        float h2 =h;
        float s = 0;
        //write your code here......
        //反弹的高度为  h/2的次数  100/2/2/2           h*Math.pow(2,-n)     3次
        //经过的距离为  100+h/2*2+h/2/2*2   h+h+h/2    h+h+h/(Math.pow(2,n-2))
        for(int i = 0; i < n; i++){
            high = h1/2;
            h1 /= 2;
        }
        if(n == 1){
            s = h;
        }else if(n == 2){
            s = 2*h;
        }else{
            s=2*h;
            for(int j = 3; j <= n ;j++){
                s = s + h2/2;
                h2 /= 2;
            }
        }
        System.out.println(String.format("%.3f", high)+" "+String.format("%.3f", s));
    }
}
